import { ref } from 'vue'
import { defineStore } from 'pinia'

const useGoodsStore = defineStore('goods', () => {
  const currentGoods = ref({})
  const isEdit = ref(false)

  const updateCurrentGoods = (value) => {
    currentGoods.value = value
  }

  const updateIsEdit = (value) => {
    isEdit.value = value
  }

  return {
    currentGoods, updateCurrentGoods,
    isEdit, updateIsEdit
  }
})

export default useGoodsStore